Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: prometheus metrics #508

Merged
merged 1 commit into from
Feb 8, 2022

Conversation

masaruhoshi
Copy link
Contributor

Description

Introduces simple metrics for Flask application using prometheus-flask-exporter for mutate endpoints. The metrics are available from the /metrics endpoint.

It also introduces the possibility to specify a different port for the mutating webhook based on the service port.

Checklist

  • PR is rebased to/aimed at branch develop
  • PR follows Contributing Guide
  • Added tests (if necessary)
  • [-] Extended README/Documentation (if necessary)
  • Adjusted versions of image and Helm chart in values.yaml and Chart.yaml (if necessary)

@tluimes
Copy link
Contributor

tluimes commented Feb 2, 2022

Addresses feature issue: #511

Copy link
Collaborator

@xopham xopham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@masaruhoshi @tluimes great work! Really like the feature 🚀

I have some comments on e.g. the service port (which I think is valid, but not well scoped to the PR), the docs update (will provide basic infrastructure)...

Thanks for the contribution 🙏

connaisseur/flask_application.py Outdated Show resolved Hide resolved
helm/templates/certificate_webhook-conf.yaml Outdated Show resolved Hide resolved
docs/README.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@xopham xopham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally, looks good to me know. I have one remaining comment. Once that is resolved, the pytests are fixed and it is squashed into one commit, I'd be happy to merge it.
There is some help on how to run pytest locally: https://sse-secure-systems.github.io/connaisseur/develop/CONTRIBUTING/#test-changes

Let me know if you need any help 🙂

@masaruhoshi
Copy link
Contributor Author

@xopham, @tluimes and I had a few backs and forth fighting with the tests but we finally managed to get everything green. Thanks for the great help, @tluimes

xopham
xopham previously approved these changes Feb 8, 2022
Copy link
Collaborator

@xopham xopham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! thanks for the great work. Very much appreciate the contribution 🙏

Co-authored-by: Masaru Hoshi <[email protected]>
Co-authored-by: Tim Luimes <[email protected]>
Copy link
Collaborator

@xopham xopham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

preparing merge: squashed 🛠️ and signed ✍️

@xopham xopham merged commit 77ab33b into sse-secure-systems:develop Feb 8, 2022
@masaruhoshi masaruhoshi deleted the prometheus-support branch February 8, 2022 20:04
@xopham xopham mentioned this pull request Feb 11, 2022
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants